import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
let router = new VueRouter({
  // mode: 'history',
  scrollBehavior() {
    return {
      x: 0,
      y: 0
    }
  },
  routes: [
    {
      path: '/',
      component: () => import('@/components/Home'),
      redirect: '/imageManagement',
      children: [
        {
          path: '/imageManagement',
          name: 'imageManagement',
          component: () => import('@/views/ImageManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: true
          },
        },
        {
          path: '/test',
          name: 'test',
          component: () => import('@/views/test'),
          meta: {
            requireAuth: true,
            isKeepAlive: true
          },
        },
        {
          // 视屏，图片详情页
          path: '/imageVideoDetail',
          name: 'imageVideoDetail',
          component: () => import('@/components/imageVideo/imageVideoDetail'),
          meta: {
            requireAuth: true,
            isKeepAlive: true
          }
        },
        {
          // 视屏，图片详情页
          path: '/multipleUpload',
          name: 'multipleUpload',
          component: () => import('@/components/imageVideo/multipleUpload'),
          meta: {
            requireAuth: true,
            isKeepAlive: true
          }
        },
        {
          // 资料详情页
          path: '/docDetail',
          name: 'docDetail',
          component: () => import('@/components/information/docDetail'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        // 图册管理列表
        // {
        //   path: '/pictureManagement',
        //   name: 'pictureManagement',
        //   component: () => import('@/views/pictureManagement'),
        //   redirect: '/pictureList',
        //   meta: {
        //     requireAuth: true,
        //     isKeepAlive: false
        //   },
        //   children: [{
        //     path: '/pictureList',
        //     name: 'pictureList',
        //     component: () => import('../components/picture/pictureList')
        //   },
        //   {
        //     path: '/picListDetail',
        //     name: 'picListDetail',
        //     component: () => import('../components/picListDetails')
        //   }]
        // },
        {
          path: '/targetManagement',
          name: 'targetManagement',
          component: () => import('@/views/targetManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        {
          path: '/dataEvaluate',
          name: 'dataEvaluate',
          component: () => import('@/views/dataEvaluate'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        {
          path: '/labelManagement',
          name: 'labelManagement',
          component: () => import('@/views/LabelManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        {
          path: '/dataSharing',
          name: 'dataSharing',
          component: () => import('@/views/DataSharing'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        {
          path: '/dataStatistics',
          name: 'dataStatistics',
          component: () => import('@/views/dataStatistics'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        // {
        //   path: '/dataStatistics2',
        //   name: 'dataStatistics2',
        //   component: () => import('@/views/dataStatistics2'),
        //   meta: { requireAuth: true,
        //     isKeepAlive: false
        //   }
        // },
        {
          path: '/imagesVideoAddPageTable',
          name: 'imagesVideoAddPageTable',
          component: () => import('@/views/imagesVideoAddPageTable'),
          meta: {
            requireAuth: true,
            isKeepAlive: true
          },
          children: [
            {
              path: '/imagesVideoAddPageTable/imagesVideoAddTable',
              name: 'imagesVideoAddTable',
              component: () => import('@/components/imageVideo/imagesVideoAddTable'),
              meta: {
                requireAuth: true,
                isKeepAlive: true
              }
            },
            {
              path: '/imagesVideoAddPageTable/multipleUpload',
              name: 'multipleUpload',
              component: () => import('@/components/imageVideo/multipleUpload'),
              meta: {
                requireAuth: true,
                isKeepAlive: true
              }
            },
          ]
        },

        // 标签管理
        {
          path: '/tagsManagement',
          name: 'tagsManagement',
          component: () => import('@/views/tagsManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        {
          path: '/tagsDataManagement',
          name: 'tagsDataManagement',
          component: () => import('@/views/tagsDataManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        // 说明页
        {
          path: '/question',
          name: 'question',
          component: () => import('@/layout/question'),
          meta: {
            requireAuth: false,
            isKeepAlive: false
          },
        }
      ]
    },
    {
      path: '/showDataSubsystem',
      component: () => import('@/layout/showDataSubsystem'),
      children: [
        {
          path: '/',
          component: () => import('@/layout/extractDataSubsystem'),
          redirect: '/ImageManagement',
          children: [
            {
              path: '/ImageManagement',
              name: 'ImageManagement',
              component: () => import('@/views/ImageManagement'),
              meta: {
                requireAuth: true,
                isKeepAlive: true
              }
            },
            // 图册管理列表
            {
              path: '/pictureManagement',
              name: 'pictureManagement',
              component: () => import('@/views/pictureManagement'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
            {
              path: '/targetManagement',
              name: 'targetManagement',
              component: () => import('@/views/targetManagement'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
            {
              path: '/dataEvaluate',
              name: 'dataEvaluate',
              component: () => import('@/views/dataEvaluate'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
            {
              path: '/labelManagement',
              name: 'labelManagement',
              component: () => import('@/views/LabelManagement'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
            {
              path: '/dataSharing',
              name: 'dataSharing',
              component: () => import('@/views/DataSharing'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
            {
              path: '/dataStatistics',
              name: 'dataStatistics',
              component: () => import('@/views/dataStatistics'),
              meta: {
                requireAuth: true,
                isKeepAlive: false
              }
            },
          ]
        },
        // 图册管理   atlas-managementa
        {
          path: '/atlasManagement',
          name: 'atlasManagement',
          component: () => import('@/views/AtlasManagement'),
          meta: {
            requireAuth: true,
            isKeepAlive: false
          }
        },
        // 产品管理  ProductManagement
        {
          path: '/productManagement',
          name: 'productManagement',
          component: () => import('@/views/ProductManagement'),
        },
        // 资料展示
        {
          path: '/presentationData',
          name: 'presentationData',
          component: () => import('@/views/PresentationData'),
          meta: { requireAuth: true, }
        },
        // 显示html
        {
          path: '/showHtml',
          name: 'showHtml',
          component: () => import('@/views/showHtml'),
          meta: { requireAuth: true, }
        },
        // 说明页
        {
          path: '/questionShow',
          name: 'questionShow',
          component: () => import('@/layout/question'),
          meta: {
            requireAuth: false,
            isKeepAlive: false
          },
        }
      ]
    },

  ]
})

export default router